package club.kunlingou.dsc.common.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

	private static final String YYMMDD = "yyyy-MM-dd";

	public static String format(Date date) {
		return format(date, "yyyy-MM-dd");
	}

	public static String format(Date date, String mask) {
		SimpleDateFormat fm = new SimpleDateFormat(mask);
		return date != null ? fm.format(date) : "";
	}
}
